

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf8" />
    <title>上海裔剑物联系统</title>
    <style>
        .pay-head{ position: absolute;top:0px;left:0px;right:0px;background-color:#E0E1DC; text-align:center;padding-top:40px;border-bottom:3px #D4D4D2 solid;}
        .pay-head h{ font-family:"黑体";font-size:40px;margin-bottom:20px;height:60px;line-height:60px;}
        .pay-head p{margin-top:40px;margin-bottom:40px;height:100px;line-height:100px;}
        .pay-head p b{font-family:"黑体";font-size:60px}
        .pay-head p span{font-family: Arial, Helvetica, sans-serif;font-size:120px}
        .pay-content{position:absolute;top:300px;right:0px;left:0px;border-bottom:3px #D4D4D2 solid;}
        .pay-content p{margin:50px;font-size:40px;font-family:"黑体";height:60px;line-height:60px;}
        .pay-content p span:first-child{color:#828282;}
        .pay-right{float:right;}
        .pay-buttom{position:absolute;top:670px;right:0px;left:0px;text-align:center;padding-top:60px;}
        .pay-buttom button{outline:none;height:120px;width:80%;background:#1BA625;border-radius:10px;font-size:70px;line-height:120px;color:#ffffff;}
    </style>
</head>
<script type="text/javascript">
    //调用微信JS api 支付
    function jsApiCall()
    {
        WeixinJSBridge.invoke(
                'getBrandWCPayRequest',
        {$jsApiParameters},
        function (res) {
            if(res.err_msg == "get_brand_wcpay_request:ok" ) {
                alert("支付成功!");
                location.href="./index.php?g=wulian&m=index&a=index";
            }else{
                alert("支付失败!");
                location.href="./index.php?g=wulian&m=index&a=index";
            }

        }
    );
    }

    function callpay()
    {
        if (typeof WeixinJSBridge == "undefined") {
            if (document.addEventListener) {
                document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
            } else if (document.attachEvent) {
                document.attachEvent('WeixinJSBridgeReady', jsApiCall);
                document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
            }
        } else {
            jsApiCall();
        }
    }
</script>
<body>
<div class="pay-head">
    <h><?php echo $title;?></h>
    <p><b>￥</b><span>{$price}</span></p>
</div>
<div class="pay-content">
    <p><span>收款方</span><span class="pay-right">上海裔剑物联系统</span></p>
    <p><span>订  单</span><span class="pay-right">{$order_number}</span></p>
</div>
<div  class="pay-buttom" onclick="callpay()" >
    <button>立即支付</button>
</div>
</body>
</html>